import { observable, action, autorun, toJS } from 'mobx';
import { WeaTableNew, WeaForm } from 'comsMobx';
import { WeaTools } from 'ecCom';
import { message } from 'antd';
import * as Apis from '../apis/sellChance';
import { WeaLocaleProvider } from 'ecCom';


const getLabel = WeaLocaleProvider.getLabel;
export default class sellchanceViewStore {
    @observable customerId = '';
    @observable sellchanceId = '';

    @action
    initSellchanceInfo=(params = {}) => {
      this.sellchanceId = params.sellchanceId;
      Apis.getSellChanceDetail({ sellchanceId: params.sellchanceId }).then((data) => {
        if (data.status == 'success') {
          this.customerId = data.datas.customerId;
        } else {
          message.error(getLabel(83437, '出现错误！') + data.msgcode);
        }
      }).catch(err => message.error(err));
    }
}

